import request from '@/utils/request'
// 登录请求
export const loginAPI = ({ account, password }) => {
  // 使用URLSearchParams来创建x-www-form-urlencoded格式的数据
  const formData = new URLSearchParams()
  formData.append('username', account)
  formData.append('password', password)
  
  return request({
    url: '/login/',
    method: 'POST',
    data: formData,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}
// 猜你喜欢数据请求
export const getLikeListAPI = ({ limit = 4 }) => {
  return request({
    url: '/goods/relevant',
    params: {
      limit
    }
  })
}
